package com.inspur_video.inspur_video.dao;

import com.inspur_video.inspur_video.bean.Favorite;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-07-25 17:19
 * @package com.inspur_video.inspur_video.dao
 * @description
 */
public interface FavoriteDao extends JpaRepository<Favorite,Integer> {
    @Modifying
    int deleteByUIdAndVId(int uid,String aid);

    List<Favorite> findFavoritesByUId(int uid, Sort sort);
}
